package extensions.prototipador.sprites;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;

public class ImageSprite extends Sprite
{
	private Bitmap _bitmap;
	
	public ImageSprite(Resources resources, int id, float x, float y)
	{
		this(BitmapFactory.decodeResource(resources, id), x, y);
	}
	public ImageSprite(Bitmap bitmap, float x, float y)
	{
		super(x, y);
		_bitmap = bitmap;
		_width = bitmap.getWidth();
		_height = bitmap.getHeight();
	}

	public void doDraw(Canvas canvas)
	{
		canvas.drawBitmap(_bitmap, _x, _y, null);
	}
}
